package com.egobuy.product.controller;


import com.egobuy.pojo.BuyResult;
import com.egobuy.product.mapper.ItemCatMapper;
import com.egobuy.product.service.IItemCatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 商品类目 前端控制器
 * </p>
 *
 * @author Hello
 * @since 2021-11-22
 */
@RestController
@RequestMapping("item-cat")
@CrossOrigin(allowedHeaders = "*",value = "*",origins = "*",methods = {RequestMethod.GET,RequestMethod.POST},maxAge = 3600)
public class ItemCatController {
@Autowired
    private IItemCatService iItemCatService;
    @GetMapping("/queryByParentId")
    public BuyResult queryByParentId(@RequestParam(defaultValue = "0") int parentId){
        return iItemCatService.queryByParentId(parentId);
    };
}
